<template>
  <div>
       <van-nav-bar
         left-arrow
        class="app-nav-bar"
        title="任务详情页"
        @click-left="$router.back()"
      />
      <van-cell-group>
        <van-cell title="任务名称:" :value="tableData.taskName" />
        <van-cell title="任务类型:" :value="tableData.taskType" />
        <van-cell title="任务状态:" :value="tableData.taskStatus" />
        <van-cell title="排班时间:" :value="tableData.createTime+'至'+tableData.endDate" />
        <van-cell title="作业内容:" :value="tableData.taskContent" />
        <van-cell title="创建时间:" :value="tableData.modifyTime" />
      </van-cell-group>
  </div>
</template>

<script>
export default {
    name:"taskdetail",
    data(){
        return{
            tableData:[],
            imgsrcid:null,
            handlerPhoto:null
        }
    },
    methods:{
        async select(){
            var {data:res} =await this.$axios({
                url:this.$location.getTaskById,
                params:{
                    id:this.$route.params.id
                }
            })
           this.tableData=res.data;
        },
    },
    created(){
        this.select();
        
        this.imgsrcid=this.$location.getPhoto+'?id='+this.$route.params.id+"&width=100&height=100"
        this.handlerPhoto=this.$location.getHandlerPhoto+'?id='+this.$route.params.id+"&width=100&height=100"
    }
}
</script>

<style lang="less" scoped>
    /deep/ .app-nav-bar{
        background-color: #3296fa;
        .van-nav-bar__title{
            color: #fff;
        }
        .van-icon{
            color: #fff;
        }
    }
    /deep/ .btn button{
        margin: 10px;
    }
</style>